import request from '@/utils/request';
    
interface DetailParamsType {
    typeId: number;
}

interface AddParamsType {
  typeName: string;
}

export async function queryType(): Promise<any> {
  return request('/api/type');
}

export async function queryTypeDetail(params: DetailParamsType): Promise<any> {
  return request('/api/type/detail', { params });
}

export async function addType(params: AddParamsType): Promise<any> {
  return request.post('/api/type', { data: params });
}

export async function delType(params: DetailParamsType): Promise<any> {
  return request.delete('/api/type', { params });
}